package com.ygxsk.carhome.response;

import android.os.Parcel;
import android.os.Parcelable;

//档案里的附件？
/*
 * @Author:itchenqi175@163.com
 * @Time:2023-08-18  14:58
 * @Description:合同附件路径
 */
public class ArchivesManageFileVo implements Parcelable {

//    "filePath": "" //合同附件路径
//    {
//        "code":"20000",
//            "data":{
//                "largeUrlSuffix":"",
//                "smallUrlSuffix":"",
//                "url":"http://222.222.17.184:8990/resource/null/20230818/2023081810312051410204.jpg",
//                "urlPrefix":"http://222.222.17.184:8990/resource/",
//                "urlSuffix":"null/20230818/2023081810312051410204.jpg"
//    },
//        "message":"success"
//    }

//     "archivesManageFileVoList": [
//    {
//        "archivesId": 18,
//            "createCustomerId": 4,
//            "createTime": "2023-08-29 14:15:33",
//            "fileId": 35,
//            "filePath": "null/20230829/2023082914144439993768.jpg",
//            "isDelete": 0,
//            "url": "http://222.222.17.184:8990/resource/null/20230829/2023082914144439993768.jpg",
//            "urlPrefix": "http://222.222.17.184:8990/resource/"
//    },
//    {
//        "archivesId": 18,
//            "createCustomerId": 4,
//            "createTime": "2023-08-29 14:15:33",
//            "fileId": 36,
//            "filePath": "null/20230829/2023082914144445892870.png",
//            "isDelete": 0,
//            "url": "http://222.222.17.184:8990/resource/null/20230829/2023082914144445892870.png",
//            "urlPrefix": "http://222.222.17.184:8990/resource/"
//    },
//    {
//        "archivesId": 18,
//            "createCustomerId": 4,
//            "createTime": "2023-08-29 14:15:33",
//            "fileId": 37,
//            "filePath": "null/20230829/2023082914144464155780.png",
//            "isDelete": 0,
//            "url": "http://222.222.17.184:8990/resource/null/20230829/2023082914144464155780.png",
//            "urlPrefix": "http://222.222.17.184:8990/resource/"
//    },
//    {
//            "archivesId": 18,
//            "createCustomerId": 4,
//            "createTime": "2023-08-29 14:15:33",
//            "fileId": 38,
//            "filePath": "null/20230829/2023082914150503984532_750x750.jpg",
//            "isDelete": 0,
//            "url": "http://222.222.17.184:8990/resource/null/20230829/2023082914150503984532_750x750.jpg",
//            "urlPrefix": "http://222.222.17.184:8990/resource/"
//    },
//    {
//            "archivesId": 18,
//            "createCustomerId": 4,
//            "createTime": "2023-08-29 14:15:33",
//            "fileId": 39,
//            "filePath": "null/20230829/2023082914150560725478_750x750.jpg",
//            "isDelete": 0,
//            "url": "http://222.222.17.184:8990/resource/null/20230829/2023082914150560725478_750x750.jpg",
//            "urlPrefix": "http://222.222.17.184:8990/resource/"
//    }

    //特别注释：字段 filePath 独自做上传用；
    private String filePath;//指的是： "filePath":"null/20230818/2023081810312051410204.jpg"


    /**
     * archivesId : 18
     * createCustomerId : 4
     * createTime : 2023-08-29 14:15:33
     * fileId : 39
     * isDelete : 0
     * url : http://222.222.17.184:8990/resource/null/20230829/2023082914150560725478_750x750.jpg
     * urlPrefix : http://222.222.17.184:8990/resource/
     */

//    private int archivesId;
//    private int createCustomerId;
//    private String createTime;
    private String fileId;
    //    private int isDelete;
    private String url;

    //图片的附件类型
    private int fileType;

    //这个fileType的name可以根据 遍历获取获得
    private int fileTypeName;

    public int getFileTypeName() {
        return fileTypeName;
    }

    public void setFileTypeName(int fileTypeName) {
        this.fileTypeName = fileTypeName;
    }

    public int getFileType() {
        return fileType;
    }

    public void setFileType(int fileType) {
        this.fileType = fileType;
    }

    //    private String urlPrefix;

//    public int getArchivesId() {
//        return archivesId;
//    }

//    public void setArchivesId(int archivesId) {
//        this.archivesId = archivesId;
//    }

    public String getFileId() {
        return fileId;
    }

    public void setFileId(String fileId) {
        this.fileId = fileId;
    }


    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

//    public String getUrlPrefix() {
//        return urlPrefix;
//    }

//    public void setUrlPrefix(String urlPrefix) {
//        this.urlPrefix = urlPrefix;
//    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.filePath);
//        dest.writeInt(this.archivesId);
        dest.writeString(this.fileId);
        dest.writeString(this.url);
//        dest.writeString(this.urlPrefix);
    }

    public void readFromParcel(Parcel source) {
        this.filePath = source.readString();
//        this.archivesId = source.readInt();
        this.fileId = source.readString();
        this.url = source.readString();
//        this.urlPrefix = source.readString();
    }

    public ArchivesManageFileVo() {
    }

    protected ArchivesManageFileVo(Parcel in) {
        this.filePath = in.readString();
//        this.archivesId = in.readInt();
        this.fileId = in.readString();
        this.url = in.readString();
//        this.urlPrefix = in.readString();
    }

    public static final Creator<ArchivesManageFileVo> CREATOR = new Creator<ArchivesManageFileVo>() {
        @Override
        public ArchivesManageFileVo createFromParcel(Parcel source) {
            return new ArchivesManageFileVo(source);
        }

        @Override
        public ArchivesManageFileVo[] newArray(int size) {
            return new ArchivesManageFileVo[size];
        }
    };

//    @Override
//    public String toString() {
//        return "ArchivesManageFileVo{" +
//                "filePath='" + filePath + '\'' +
//                ", archivesId=" + archivesId +
//                ", fileId=" + fileId +
//                ", url='" + url + '\'' +
//                ", urlPrefix='" + urlPrefix + '\'' +
//                '}';
//    }
}
